package com.tulingxueyuan.order.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.stereotype.Service;

/**
 * @author :tangweiliang
 * @date : 2023/2/23 23:14
 * 未来的你会感谢现在努力的自己
 */
@Service
public class IOrderServiceImpl implements IOrderService {
    @Override
    @SentinelResource(value = "getUser",blockHandler = "blockHandlerGetUser")
    public String getUser() {
        return "查询用户";
    }

    public String blockHandlerGetUser(BlockException e){
        return "流控用户";
    }
}
